// Formular checken und Bestätigung
function checkAndConfirm(document_name, msg)
{
  var send = false;
  var form = document.forms[document_name];

  for (i = 0; i < form.elements.length; i++)
  {
    if ('text' == form[i].type)
    {
      if ('' != form[i].value)
      {
          send = true;
          break;
      }
    }
    else if ('checkbox' == form[i].type)
    {
        if ((form[i].defaultChecked == true  && form[i].checked == false) ||
            (form[i].defaultChecked == false && form[i].checked == true))
        {
            send = true;
            break;
        }
    }
  }
  // Bestätigung
  if(send)
  {
    var answer = confirm(msg)
    if (answer)
    {
        return true;
    }
    else
    {
        return false;
    }
  }
  else
  {
      alert('Es gab keine Änderungen!');
      return false;
  }
}